<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    function sayHi(){
      console.log(`Hi~`)
    }
    for(let i = 1; i <= 3; i++){
      sayHi()
    }
    // 形参  形式上的参数  
    function getSum(start, end) {   // end = 50
      //start和end在没有传入实参时候默认undefined
      // console.log(end)
      let sum = 0
      for (let i = start; i <= end; i++) {
        sum += i
      }
      console.log(sum)
    }
    getSum(1, 50)  // 调用的小括号里面 实参 - 实际的参数
    getSum(100, 200)  // 实参 - 实际的参数
  </script>
</body>
</html>